<template>
  <div>
     <router-link :to="{name: 'home'}" tag="li" ><a-button>首页</a-button></router-link>
    <router-link :to="{name: 'account'}" tag="li" ><a-button>记账</a-button></router-link>
    <router-link :to="{name: 'check'}" tag="li"><a-button>财务统计</a-button></router-link>
    <router-link :to="{name: 'business'}" tag="li" ><a-button>代理工商注册</a-button></router-link>
    <router-link :to="{name: 'label'}" tag="li" ><a-button>代理商标注册</a-button></router-link>
    <router-link :to="{name: 'arrange'}" tag="li" ><a-button>税收筹划</a-button></router-link>
    <router-link :to="{name: 'user'}" tag="li" ><a-button>用户</a-button></router-link>
  
    <router-link :to="{name: 'consult'}" tag="li" ><a-button>建议反馈</a-button></router-link>
    <a-button @click="toLogin">登录</a-button>
    <a-button @click="getMenus">测试</a-button>
     <a-button @click="toBoss">控制台</a-button>


    <router-view></router-view>
  </div>
</template>


<script setup>
import { ref } from "vue";
import {useRouter} from 'vue-router'

import { get } from "@/common";

const router = useRouter();
const selectMenu = ({ item, key, selectedKeys })=>{
  console.log(item,key,selectedKeys);
  router.push({path:key});

};

const current = ref(["mail"]);

const menus = ref([]);

const getMenus = () => {
  get("/query/worker/hi1").then((res) => {

    menus.value = res.data;

  });
};

const toLogin = ()=>{
  router.push({path:'login'})
}
const toBoss = () =>{
  router.push({path:'query'})
};


</script>

<style>
.home-nav {
  height: 50px;
  width: 100%;
  text-align: center;
  box-shadow: 0px 1px 5px 5px rgba(0, 0, 0, 0.05);
}
</style>